﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using Zen4SyncPOCO.POCO.Admin;

namespace Zen4SyncPOCO.ClientTestSessionDescriptorHandler
{
    public interface IClientTestSessionDescriptorHandler
    {
        /// <summary>
        /// Creates a ClientTestSessionDescriptor from the given ClientSession.
        /// </summary>
        /// <remarks>
        /// The potential overriding data in the given ClientSession are all written in
        /// the ClientTestSessionDescriptor.
        /// </remarks>
        /// <param name="clientSession">The ClientSession to turn into a ClientTestSessionDescriptor.</param>
        /// <returns>The ClientTestSessionDescriptor equivalent of the given ClientSession.</returns>
        XElement CreateClientTestSessionDescriptor(ClientSession clientSession);

        /// <summary>
        /// Creates a ClientSession from the given ClientTestSessionDescriptor.
        /// </summary>
        /// <remarks>
        /// The potential overriding data present in the given ClientTestSessionDescriptor are used
        /// to set activities property values.
        /// Therefore the returned ClientSession does not contain any overriding data as they've been taken into
        /// account when setting values of activity properties.
        /// </remarks>
        /// <param name="clientTestSessionDescriptor">The ClientTestSessionDescriptor to turn into a ClientSession.</param>
        /// <returns>
        /// The ClientSession equivalent to the given ClientTestSessionDescriptor. Note that the returned
        /// ClientSession does not contain any overriding data.
        /// </returns>
        ClientSession ReadClientTestSessionDescriptor(XElement clientTestSessionDescriptor);
    }
}
